package cas.ihep.hep.unsafe;

public class NewUnsafe {
    private NewUnsafe(){}

    public native static double[] compute(double[] jparam,long dt,int dtsize,long mc,int mcsize);

    private static volatile boolean loaded=false;

    public static void loadLibrary(String path){
        if(!loaded) {
            synchronized (NewUnsafe.class) {
                if(!loaded) {
                    System.load(path);
                    registerNatives();
                    loaded=true;
                }
            }
        }
    }

    private static native void registerNatives();
}
